package com.lee.rocket;

import java.net.URL;
import java.util.concurrent.CountDownLatch;

public class Rocket {

    private String filePath = null;
    private String fileName = null;
    private String tempFileName = null;

    private int threadNumber = 0;

    //设置一个计数器，代码内主要用来完成对缓存文件的删除
    private CountDownLatch latch = null;

    private long fileLength = 0;
    private long threadLength = 0;
    private long[][] startEndPos;//保留每个线程下载数据的起始位置。

    private boolean bool = false;

    private URL url = null;

    //有参构造函数，先构造需要的数据
    public Rocket(String filepath, int threadNumber) {
        this.filePath = filepath;
        this.threadNumber = threadNumber;
        this.startEndPos = new long[this.threadNumber][2];
        this.latch = new CountDownLatch(this.threadNumber);
    }

}
